<?php

function curl($url, $data)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $this->curl_host);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    $output = curl_exec($ch);
    curl_close($ch);
    $result = json_decode($output, true);
}